Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add stellar add gas function #338

Merged
merged 14 commits into from
Dec 20, 2024
Merged

feat: add stellar add gas function #338

merged 14 commits into from
Dec 20, 2024

Conversation

npty
Copy link
Member

@npty npty commented Nov 14, 2024

Description

Implement add gas function for stellar. This function will generate xdr encoded transaction that will be ready to sign by the user.

https://axelarnetwork.atlassian.net/browse/AXE-6363

Usage

import { AxelarQueryAPI } from '@axelar-network/axelarjs-sdk';

const api: AxelarGMPRecoveryAPI = new AxelarGMPRecoveryAPI({
  environment: Environment.TESTNET,
});

const transaction = await addGasToStellarChain({
    senderAddress: 'GCXXX...', // The contract address that initiates gateway contract call
    messageId: 'msg-123', // tx message id
    tokenAddress: "", // the default value will be the native token, XLM.
    tokenAmount: '10000000', // the amount to add
    refundAddress: 'GXXX...' // Address to receive unused gas
});

// Sign with wallet (e.g., Freighter)
const signedTx = await window.freighter.signTransaction(transaction);

Alpha Release

@axelar-network/[email protected]

Update 03/12/24:

Bumped to alpha.7 to allow passing custom contract address. This'll be useful for testing on testnet since the contract address will be different for each quarter because stellar testnet will be reset. The next reset is around 10 December.

@axelar-network/[email protected]

Update 05/12/24:

Fix this method only supports testnet error on devnet.

@axelar-network/[email protected]

@npty npty requested a review from canhtrinh November 14, 2024 12:30
@npty npty self-assigned this Nov 14, 2024
@npty npty marked this pull request as ready for review December 2, 2024 10:25
@npty npty merged commit 9f915d9 into main Dec 20, 2024
4 checks passed
@npty npty deleted the feat/add-gas-for-stellar branch December 20, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants